Documentation for the MENUDEMO.VBX custom control. The MENUDEMO.VBX custom control provides the capability to determine when someone has moved the mouse pointer over a menu item before it is clicked. This can be used to display a message in a status bar to tell someone what each menu item does while they scroll through the different choices. This type of display is currently used by many of today’s popular programs. LICENSE AGREEMENT: You may freely distribute the MENUDEMO.ZIP file, provided none of the files are altered. MENUDEMO.ZIP contains the following files: MENUDEMO.VBX, MENUDEMO.TXT, MENUDEM.MAK, and MENUDEM.FRM. You may not distribute the MENUDEMO.VBX file as part of your own programs. If you want to distribute this custom control as part of your own programs, you must purchase a registered version called MENUINFO.VBX, described at the end of this file. REQUIREMENTS: The MENUDEMO.VBX requires Visual Basic 2.0 or greater, and Windows 3.1 or greater. The sample Visual Basic project MENUDEM.MAK was written with Visual Basic 3.0. The Visual Basic form MENUDEM.FRM was saved in an ASCII format and can be viewed with any text editor. INSTALLATION: Start Visual Basic and load the MENUDEM.MAK project. DIRECTIONS: The sample Visual Basic project MENUDEM.MAK demonstrates how to use the MENUDEMO.VBX custom control to display a message in a status bar while someone scrolls through the different menu choices. It may help to print out this file and use the sample project. There are only three procedures associated with MENUDEMO.VBX: Open - The menu has been opened. Close - The menu has been closed. Select - A menu item has been selected (highlighted, NOT clicked). Use the Open and Close procedures to save and restore messages in a status bar, and the Select procedure to display messages for the highlighted menu item. The Select procedure returns a value called MenuIndex, which is the position of the menu item in the menu. If any menu item in the Control Menu is selected a MenuIndex of 0 will be returned. It is VERY IMPORTANT to note that ONLY VISIBLE menu items are used in determining the positions of the menu items. If a menu item is not Visible it does not have a position index in the menu, and if it has any submenus they will not have any position indexes in the menu. If a menu item is Enabled or Disabled it does not effect the position indexes of any menu items, including submenus. You must reset the indexing to your messages for the menu items after you change the Visible Property of a menu item. The sample project MENUDEM.MAK demonstrates in detail how to use the MENUDEMO.VBX custom control. Be sure to look at the source code if you have any questions. In the sample project the menu structure and MenuIndex is as follows: File...............1 Open ..........2 Close .........3 Exit...........4 Edit...............5 Copy...........6 Align..........7 Top........8 Bottom.....9 Last...........10 If the [Edit : Align] menu item was not Visible, then the menu structure and MenuIndex would look as follows: File...............1 Open ..........2 Close .........3 Exit...........4 Edit...............5 Copy...........6 Last...........7 Note: The index to the last menu item has changed from 10 to 7 because 3 previously visible menu items are no longer in the menu. REGISTRATION INFORMATION: The shareware version, MENUDEMO.VBX, will only return a MenuIndex value up to 10. If more then 10 menu items exist it will return a 0 for any menu items past 10. To obtain a registered version, MENUINFO.VBX, which works with an unlimited number of menu items, send $15 to: Jeff Becker 4880-8 Dorsey Hall Drive Ellicott City, MD 21042 Please send any comments, questions, or suggestions to the address above. Thank you.